package com.jiyun.feign;


import com.jiyun.entity.day06.Paper;
import com.jiyun.vo.ResponseBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("day06-paper")
public interface PaperFeign {
    /**
     * 根据课程id查询相应数据
     * @param contestId
     * @return
     */
    @RequestMapping("/findPaperByContest")
    ResponseBean findPaperByContest(@RequestParam("contestId") Integer contestId);

    /**
     * 遍历
     * @param paper
     * @return
     */
    @RequestMapping("findByAll")
    public ResponseBean findByAll(@RequestBody Paper paper);
    /**
     * 查询最热的数据
     * @return
     */
    @RequestMapping("findByUserMax")
    public ResponseBean findByUserMax();

    /**
     * 查询最新数据
     * @return
     */
    @RequestMapping("findNewTime")
    public ResponseBean findNewTime();
}
